-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: invalid text 'null' in request when no args given #29
fix: invalid text 'null' in request when no args given #29
Conversation
in these requests, if the optional args are None, instead of passing a empty request body, a text 'null' will be added, which results in 400 response saying ``` { "error": { "message": "JSON failed to parse.", "status_code": 400 } } ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please either reformat this pr to automatically apply these patches in generate.sh or edit the underlying specification, from which the rust crate is generated.
This reverts commit da82cf9.
In these requests, if the optional args are None, instead of passing a empty request body, a text 'null' will be added, which results in 400 response saying ``` { "error": { "message": "JSON failed to parse.", "status_code": 400 } } ``` This fix checks for the optional args, and only write to the request body if they have values. It is mainly for `finish_file_data_upload` as it allows an emty body, but the other two will still fail anyway.
Hi! Thanks for your correction. I have tried adding it to |
Likely, please attach everything in the PR and we can check. What kind of files?
…-------- Original Message --------
On 10/17/24 04:00, paradox8599 wrote:
> Please either reformat this pr to automatically apply these patches in generate.sh or edit the underlying specification, from which the rust crate is generated.
Hi! Thanks for your correction. I have tried adding it to generate.sh, but running the script result in a lot of other files being changed. Is it expected?
—
Reply to this email directly, [view it on GitHub](#29 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABGGVUKRR3EHJQA7NRKSM4LZ34K2FAVCNFSM6AAAAABQBYKPFGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJYGMZTINZRGU).
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
All the changed files are already included in this PR. |
Looks good to me. All the other files are just regular updates coming from newer version of the spec. |
Signed-off-by: C0D3 M4513R <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also looks good to me now. I'll merge this later today.
What should I do for future PRs? (if there's any) |
to do the regeneration, you mainly need to find the released openapi.yaml from the specification repo (https://github.com/vrchatapi/specification). Doing that requires:
|
Yes, that's the ideal scenario. |
Sure, thank you! |
In these requests, if the optional args are None, instead of passing a empty request body, a text 'null' will be added:
which results in 400 response saying
This fix checks for the optional args, and only write to the request body if they have values.
It is mainly for
finish_file_data_upload
as it allows an emty body, but the other two will still fail anyway.